#ifndef COMPONENTRENDERABLE_H
#define COMPONENTRENDERABLE_H

#include "Component.h"
#include "Ogre.h"



class ComponentRenderable : public Component
{
public:
    ComponentRenderable(ComponentManager* _parent, ComponentArguments _args);
    virtual ~ComponentRenderable();

    virtual void initialize();
    virtual void destroy();

    virtual void saveToXML(TiXmlElement* parentElement);
    virtual void loadFromXML(TiXmlElement* parentElement);

    virtual void update(double timeSinceLastFrame);
    virtual void registerNewComponent(std::string _newComponentName);

    void facePoint(const Ogre::Vector3 &point);

  Ogre::SceneNode* getNode(){return m_node;};

protected:
private:

    Ogre::SceneNode* m_node;
    Ogre::Entity* m_entity;

    Component* m_positionComponent;

    std::string m_nameMesh;

    Ogre::Vector3 m_baseRotation;


};

#endif // COMPONENTRENDERABLE_H
